home *** CD-ROM | disk | FTP | other *** search
- //***********************************************************************
- //
- // DlgDemo3.h
- //
- //***********************************************************************
-
- class CMyApp : public CWinApp
- {
- public:
- virtual BOOL InitInstance ();
- };
-
- class CMainWindow : public CFrameWnd
- {
- private:
- int m_nFillType;
- int m_nFillColor;
- CString m_text;
- int m_nHeight;
- BOOL m_bBold;
- BOOL m_bItalic;
-
- void DoSolidFill (CDC*, CRect*);
- void DoGradientFill (CDC*, CRect*);
- void DoDrawText (CDC*, CRect*);
-
- public:
- CMainWindow ();
-
- protected:
- afx_msg BOOL OnEraseBkgnd (CDC*);
- afx_msg void OnPaint ();
- afx_msg void OnOptionsSettings ();
- afx_msg void OnOptionsExit ();
- afx_msg void OnOptionsAbout ();
-
- DECLARE_MESSAGE_MAP ()
- };
-
- class CSettingsDialog : public CDialog
- {
- private:
- CEdit& ctlText () { return *(CEdit*) GetDlgItem (IDC_TEXT); }
- CEdit& ctlHeight () { return *(CEdit*) GetDlgItem (IDC_HEIGHT); }
- CButton& ctlBold () { return *(CButton*) GetDlgItem (IDC_BOLD); }
- CButton& ctlItalic () { return *(CButton*) GetDlgItem (IDC_ITALIC); }
- int GetCheckedRadioButton (int, int);
-
- public:
- int m_nFillType;
- int m_nFillColor;
- CString m_text;
- int m_nHeight;
- BOOL m_bBold;
- BOOL m_bItalic;
-
- CSettingsDialog (CWnd* pParentWnd = NULL) :
- CDialog (IDD_SETTINGSDLG, pParentWnd) {}
-
- virtual BOOL OnInitDialog ();
-
- protected:
- virtual void OnOK ();
-
- afx_msg void OnDefaults ();
- DECLARE_MESSAGE_MAP ()
- };
-
- class CAboutDialog : public CDialog
- {
- private:
- CRect m_rect;
-
- public:
- CAboutDialog (CWnd* pParentWnd = NULL) :
- CDialog (IDD_ABOUTDLG, pParentWnd) {}
-
- virtual BOOL OnInitDialog ();
-
- protected:
- afx_msg void OnPaint ();
- DECLARE_MESSAGE_MAP ()
- };
-